Optimal. Leaf size=429 \[ \frac {2 B^2 d^2 n^2 (a+b x)^3}{27 (b c-a d)^3 g^4 (c+d x)^3}-\frac {b B^2 d n^2 (a+b x)^2}{2 (b c-a d)^3 g^4 (c+d x)^2}+\frac {2 b^2 B^2 n^2 (a+b x)}{(b c-a d)^3 g^4 (c+d x)}-\frac {2 B d^2 n (a+b x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{9 (b c-a d)^3 g^4 (c+d x)^3}+\frac {b B d n (a+b x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(b c-a d)^3 g^4 (c+d x)^2}-\frac {2 b^2 B n (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(b c-a d)^3 g^4 (c+d x)}-\frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{3 d g^4 (c+d x)^3}+\frac {2 b^3 B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log \left (\frac {a+b x}{c+d x}\right )}{3 d (b c-a d)^3 g^4}-\frac {b^3 B^2 n^2 \log ^2\left (\frac {a+b x}{c+d x}\right )}{3 d (b c-a d)^3 g^4} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.18, antiderivative size = 429, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2551, 2356, 45,
2372, 2338} \begin {gather*} \frac {2 b^3 B n \log \left (\frac {a+b x}{c+d x}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{3 d g^4 (b c-a d)^3}-\frac {2 b^2 B n (a+b x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{g^4 (c+d x) (b c-a d)^3}-\frac {2 B d^2 n (a+b x)^3 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{9 g^4 (c+d x)^3 (b c-a d)^3}+\frac {b B d n (a+b x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{g^4 (c+d x)^2 (b c-a d)^3}-\frac {\left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{3 d g^4 (c+d x)^3}-\frac {b^3 B^2 n^2 \log ^2\left (\frac {a+b x}{c+d x}\right )}{3 d g^4 (b c-a d)^3}+\frac {2 b^2 B^2 n^2 (a+b x)}{g^4 (c+d x) (b c-a d)^3}+\frac {2 B^2 d^2 n^2 (a+b x)^3}{27 g^4 (c+d x)^3 (b c-a d)^3}-\frac {b B^2 d n^2 (a+b x)^2}{2 g^4 (c+d x)^2 (b c-a d)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 2338
Rule 2356
Rule 2372
Rule 2551
Rubi steps
\begin {align*} \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(c g+d g x)^4} \, dx &=-\frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{3 d g^4 (c+d x)^3}+\frac {(2 B n) \int \frac {(b c-a d) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{g^3 (a+b x) (c+d x)^4} \, dx}{3 d g}\\ &=-\frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{3 d g^4 (c+d x)^3}+\frac {(2 B (b c-a d) n) \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a+b x) (c+d x)^4} \, dx}{3 d g^4}\\ &=-\frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{3 d g^4 (c+d x)^3}+\frac {(2 B (b c-a d) n) \int \left (\frac {b^4 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(b c-a d)^4 (a+b x)}-\frac {d \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(b c-a d) (c+d x)^4}-\frac {b d \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(b c-a d)^2 (c+d x)^3}-\frac {b^2 d \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(b c-a d)^3 (c+d x)^2}-\frac {b^3 d \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(b c-a d)^4 (c+d x)}\right ) \, dx}{3 d g^4}\\ &=-\frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{3 d g^4 (c+d x)^3}-\frac {(2 B n) \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(c+d x)^4} \, dx}{3 g^4}-\frac {\left (2 b^3 B n\right ) \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{c+d x} \, dx}{3 (b c-a d)^3 g^4}+\frac {\left (2 b^4 B n\right ) \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{a+b x} \, dx}{3 d (b c-a d)^3 g^4}-\frac {\left (2 b^2 B n\right ) \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(c+d x)^2} \, dx}{3 (b c-a d)^2 g^4}-\frac {(2 b B n) \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(c+d x)^3} \, dx}{3 (b c-a d) g^4}\\ &=\frac {2 B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{9 d g^4 (c+d x)^3}+\frac {b B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3 d (b c-a d) g^4 (c+d x)^2}+\frac {2 b^2 B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3 d (b c-a d)^2 g^4 (c+d x)}+\frac {2 b^3 B n \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3 d (b c-a d)^3 g^4}-\frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{3 d g^4 (c+d x)^3}-\frac {2 b^3 B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{3 d (b c-a d)^3 g^4}-\frac {\left (2 B^2 n^2\right ) \int \frac {b c-a d}{(a+b x) (c+d x)^4} \, dx}{9 d g^4}-\frac {\left (2 b^3 B^2 n^2\right ) \int \frac {(c+d x) \left (-\frac {d (a+b x)}{(c+d x)^2}+\frac {b}{c+d x}\right ) \log (a+b x)}{a+b x} \, dx}{3 d (b c-a d)^3 g^4}+\frac {\left (2 b^3 B^2 n^2\right ) \int \frac {(c+d x) \left (-\frac {d (a+b x)}{(c+d x)^2}+\frac {b}{c+d x}\right ) \log (c+d x)}{a+b x} \, dx}{3 d (b c-a d)^3 g^4}-\frac {\left (2 b^2 B^2 n^2\right ) \int \frac {b c-a d}{(a+b x) (c+d x)^2} \, dx}{3 d (b c-a d)^2 g^4}-\frac {\left (b B^2 n^2\right ) \int \frac {b c-a d}{(a+b x) (c+d x)^3} \, dx}{3 d (b c-a d) g^4}\\ &=\frac {2 B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{9 d g^4 (c+d x)^3}+\frac {b B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3 d (b c-a d) g^4 (c+d x)^2}+\frac {2 b^2 B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3 d (b c-a d)^2 g^4 (c+d x)}+\frac {2 b^3 B n \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3 d (b c-a d)^3 g^4}-\frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{3 d g^4 (c+d x)^3}-\frac {2 b^3 B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{3 d (b c-a d)^3 g^4}-\frac {\left (b B^2 n^2\right ) \int \frac {1}{(a+b x) (c+d x)^3} \, dx}{3 d g^4}-\frac {\left (2 b^3 B^2 n^2\right ) \int \left (\frac {b \log (a+b x)}{a+b x}-\frac {d \log (a+b x)}{c+d x}\right ) \, dx}{3 d (b c-a d)^3 g^4}+\frac {\left (2 b^3 B^2 n^2\right ) \int \left (\frac {b \log (c+d x)}{a+b x}-\frac {d \log (c+d x)}{c+d x}\right ) \, dx}{3 d (b c-a d)^3 g^4}-\frac {\left (2 b^2 B^2 n^2\right ) \int \frac {1}{(a+b x) (c+d x)^2} \, dx}{3 d (b c-a d) g^4}-\frac {\left (2 B^2 (b c-a d) n^2\right ) \int \frac {1}{(a+b x) (c+d x)^4} \, dx}{9 d g^4}\\ &=\frac {2 B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{9 d g^4 (c+d x)^3}+\frac {b B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3 d (b c-a d) g^4 (c+d x)^2}+\frac {2 b^2 B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3 d (b c-a d)^2 g^4 (c+d x)}+\frac {2 b^3 B n \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3 d (b c-a d)^3 g^4}-\frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{3 d g^4 (c+d x)^3}-\frac {2 b^3 B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{3 d (b c-a d)^3 g^4}-\frac {\left (b B^2 n^2\right ) \int \left (\frac {b^3}{(b c-a d)^3 (a+b x)}-\frac {d}{(b c-a d) (c+d x)^3}-\frac {b d}{(b c-a d)^2 (c+d x)^2}-\frac {b^2 d}{(b c-a d)^3 (c+d x)}\right ) \, dx}{3 d g^4}+\frac {\left (2 b^3 B^2 n^2\right ) \int \frac {\log (a+b x)}{c+d x} \, dx}{3 (b c-a d)^3 g^4}-\frac {\left (2 b^3 B^2 n^2\right ) \int \frac {\log (c+d x)}{c+d x} \, dx}{3 (b c-a d)^3 g^4}-\frac {\left (2 b^4 B^2 n^2\right ) \int \frac {\log (a+b x)}{a+b x} \, dx}{3 d (b c-a d)^3 g^4}+\frac {\left (2 b^4 B^2 n^2\right ) \int \frac {\log (c+d x)}{a+b x} \, dx}{3 d (b c-a d)^3 g^4}-\frac {\left (2 b^2 B^2 n^2\right ) \int \left (\frac {b^2}{(b c-a d)^2 (a+b x)}-\frac {d}{(b c-a d) (c+d x)^2}-\frac {b d}{(b c-a d)^2 (c+d x)}\right ) \, dx}{3 d (b c-a d) g^4}-\frac {\left (2 B^2 (b c-a d) n^2\right ) \int \left (\frac {b^4}{(b c-a d)^4 (a+b x)}-\frac {d}{(b c-a d) (c+d x)^4}-\frac {b d}{(b c-a d)^2 (c+d x)^3}-\frac {b^2 d}{(b c-a d)^3 (c+d x)^2}-\frac {b^3 d}{(b c-a d)^4 (c+d x)}\right ) \, dx}{9 d g^4}\\ &=-\frac {2 B^2 n^2}{27 d g^4 (c+d x)^3}-\frac {5 b B^2 n^2}{18 d (b c-a d) g^4 (c+d x)^2}-\frac {11 b^2 B^2 n^2}{9 d (b c-a d)^2 g^4 (c+d x)}-\frac {11 b^3 B^2 n^2 \log (a+b x)}{9 d (b c-a d)^3 g^4}+\frac {2 B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{9 d g^4 (c+d x)^3}+\frac {b B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3 d (b c-a d) g^4 (c+d x)^2}+\frac {2 b^2 B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3 d (b c-a d)^2 g^4 (c+d x)}+\frac {2 b^3 B n \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3 d (b c-a d)^3 g^4}-\frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{3 d g^4 (c+d x)^3}+\frac {11 b^3 B^2 n^2 \log (c+d x)}{9 d (b c-a d)^3 g^4}+\frac {2 b^3 B^2 n^2 \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{3 d (b c-a d)^3 g^4}-\frac {2 b^3 B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{3 d (b c-a d)^3 g^4}+\frac {2 b^3 B^2 n^2 \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{3 d (b c-a d)^3 g^4}-\frac {\left (2 b^3 B^2 n^2\right ) \int \frac {\log \left (\frac {d (a+b x)}{-b c+a d}\right )}{c+d x} \, dx}{3 (b c-a d)^3 g^4}-\frac {\left (2 b^3 B^2 n^2\right ) \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,a+b x\right )}{3 d (b c-a d)^3 g^4}-\frac {\left (2 b^3 B^2 n^2\right ) \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,c+d x\right )}{3 d (b c-a d)^3 g^4}-\frac {\left (2 b^4 B^2 n^2\right ) \int \frac {\log \left (\frac {b (c+d x)}{b c-a d}\right )}{a+b x} \, dx}{3 d (b c-a d)^3 g^4}\\ &=-\frac {2 B^2 n^2}{27 d g^4 (c+d x)^3}-\frac {5 b B^2 n^2}{18 d (b c-a d) g^4 (c+d x)^2}-\frac {11 b^2 B^2 n^2}{9 d (b c-a d)^2 g^4 (c+d x)}-\frac {11 b^3 B^2 n^2 \log (a+b x)}{9 d (b c-a d)^3 g^4}-\frac {b^3 B^2 n^2 \log ^2(a+b x)}{3 d (b c-a d)^3 g^4}+\frac {2 B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{9 d g^4 (c+d x)^3}+\frac {b B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3 d (b c-a d) g^4 (c+d x)^2}+\frac {2 b^2 B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3 d (b c-a d)^2 g^4 (c+d x)}+\frac {2 b^3 B n \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3 d (b c-a d)^3 g^4}-\frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{3 d g^4 (c+d x)^3}+\frac {11 b^3 B^2 n^2 \log (c+d x)}{9 d (b c-a d)^3 g^4}+\frac {2 b^3 B^2 n^2 \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{3 d (b c-a d)^3 g^4}-\frac {2 b^3 B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{3 d (b c-a d)^3 g^4}-\frac {b^3 B^2 n^2 \log ^2(c+d x)}{3 d (b c-a d)^3 g^4}+\frac {2 b^3 B^2 n^2 \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{3 d (b c-a d)^3 g^4}-\frac {\left (2 b^3 B^2 n^2\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {d x}{b c-a d}\right )}{x} \, dx,x,a+b x\right )}{3 d (b c-a d)^3 g^4}-\frac {\left (2 b^3 B^2 n^2\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {b x}{-b c+a d}\right )}{x} \, dx,x,c+d x\right )}{3 d (b c-a d)^3 g^4}\\ &=-\frac {2 B^2 n^2}{27 d g^4 (c+d x)^3}-\frac {5 b B^2 n^2}{18 d (b c-a d) g^4 (c+d x)^2}-\frac {11 b^2 B^2 n^2}{9 d (b c-a d)^2 g^4 (c+d x)}-\frac {11 b^3 B^2 n^2 \log (a+b x)}{9 d (b c-a d)^3 g^4}-\frac {b^3 B^2 n^2 \log ^2(a+b x)}{3 d (b c-a d)^3 g^4}+\frac {2 B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{9 d g^4 (c+d x)^3}+\frac {b B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3 d (b c-a d) g^4 (c+d x)^2}+\frac {2 b^2 B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3 d (b c-a d)^2 g^4 (c+d x)}+\frac {2 b^3 B n \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3 d (b c-a d)^3 g^4}-\frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{3 d g^4 (c+d x)^3}+\frac {11 b^3 B^2 n^2 \log (c+d x)}{9 d (b c-a d)^3 g^4}+\frac {2 b^3 B^2 n^2 \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{3 d (b c-a d)^3 g^4}-\frac {2 b^3 B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{3 d (b c-a d)^3 g^4}-\frac {b^3 B^2 n^2 \log ^2(c+d x)}{3 d (b c-a d)^3 g^4}+\frac {2 b^3 B^2 n^2 \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{3 d (b c-a d)^3 g^4}+\frac {2 b^3 B^2 n^2 \text {Li}_2\left (-\frac {d (a+b x)}{b c-a d}\right )}{3 d (b c-a d)^3 g^4}+\frac {2 b^3 B^2 n^2 \text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )}{3 d (b c-a d)^3 g^4}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 4 vs. order 3 in
optimal.
time = 0.45, size = 609, normalized size = 1.42 \begin {gather*} \frac {-18 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2+\frac {B n \left (12 (b c-a d)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )+18 b (b c-a d)^2 (c+d x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )+36 b^2 (b c-a d) (c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )+36 b^3 (c+d x)^3 \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )-36 b^3 (c+d x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)-36 b^2 B n (c+d x)^2 (b c-a d+b (c+d x) \log (a+b x)-b (c+d x) \log (c+d x))-9 b B n (c+d x) \left ((b c-a d)^2+2 b (b c-a d) (c+d x)+2 b^2 (c+d x)^2 \log (a+b x)-2 b^2 (c+d x)^2 \log (c+d x)\right )-2 B n \left (2 (b c-a d)^3+3 b (b c-a d)^2 (c+d x)+6 b^2 (b c-a d) (c+d x)^2+6 b^3 (c+d x)^3 \log (a+b x)-6 b^3 (c+d x)^3 \log (c+d x)\right )-18 b^3 B n (c+d x)^3 \left (\log (a+b x) \left (\log (a+b x)-2 \log \left (\frac {b (c+d x)}{b c-a d}\right )\right )-2 \text {Li}_2\left (\frac {d (a+b x)}{-b c+a d}\right )\right )+18 b^3 B n (c+d x)^3 \left (\left (2 \log \left (\frac {d (a+b x)}{-b c+a d}\right )-\log (c+d x)\right ) \log (c+d x)+2 \text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )\right )\right )}{(b c-a d)^3}}{54 d g^4 (c+d x)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.05, size = 0, normalized size = 0.00 \[\int \frac {\left (A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )^{2}}{\left (d g x +c g \right )^{4}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 1438 vs.
\(2 (422) = 844\).
time = 0.41, size = 1438, normalized size = 3.35 \begin {gather*} \frac {1}{9} \, A B n {\left (\frac {6 \, b^{2} d^{2} x^{2} + 11 \, b^{2} c^{2} - 7 \, a b c d + 2 \, a^{2} d^{2} + 3 \, {\left (5 \, b^{2} c d - a b d^{2}\right )} x}{{\left (b^{2} c^{2} d^{4} - 2 \, a b c d^{5} + a^{2} d^{6}\right )} g^{4} x^{3} + 3 \, {\left (b^{2} c^{3} d^{3} - 2 \, a b c^{2} d^{4} + a^{2} c d^{5}\right )} g^{4} x^{2} + 3 \, {\left (b^{2} c^{4} d^{2} - 2 \, a b c^{3} d^{3} + a^{2} c^{2} d^{4}\right )} g^{4} x + {\left (b^{2} c^{5} d - 2 \, a b c^{4} d^{2} + a^{2} c^{3} d^{3}\right )} g^{4}} + \frac {6 \, b^{3} \log \left (b x + a\right )}{{\left (b^{3} c^{3} d - 3 \, a b^{2} c^{2} d^{2} + 3 \, a^{2} b c d^{3} - a^{3} d^{4}\right )} g^{4}} - \frac {6 \, b^{3} \log \left (d x + c\right )}{{\left (b^{3} c^{3} d - 3 \, a b^{2} c^{2} d^{2} + 3 \, a^{2} b c d^{3} - a^{3} d^{4}\right )} g^{4}}\right )} + \frac {1}{54} \, {\left (6 \, n {\left (\frac {6 \, b^{2} d^{2} x^{2} + 11 \, b^{2} c^{2} - 7 \, a b c d + 2 \, a^{2} d^{2} + 3 \, {\left (5 \, b^{2} c d - a b d^{2}\right )} x}{{\left (b^{2} c^{2} d^{4} - 2 \, a b c d^{5} + a^{2} d^{6}\right )} g^{4} x^{3} + 3 \, {\left (b^{2} c^{3} d^{3} - 2 \, a b c^{2} d^{4} + a^{2} c d^{5}\right )} g^{4} x^{2} + 3 \, {\left (b^{2} c^{4} d^{2} - 2 \, a b c^{3} d^{3} + a^{2} c^{2} d^{4}\right )} g^{4} x + {\left (b^{2} c^{5} d - 2 \, a b c^{4} d^{2} + a^{2} c^{3} d^{3}\right )} g^{4}} + \frac {6 \, b^{3} \log \left (b x + a\right )}{{\left (b^{3} c^{3} d - 3 \, a b^{2} c^{2} d^{2} + 3 \, a^{2} b c d^{3} - a^{3} d^{4}\right )} g^{4}} - \frac {6 \, b^{3} \log \left (d x + c\right )}{{\left (b^{3} c^{3} d - 3 \, a b^{2} c^{2} d^{2} + 3 \, a^{2} b c d^{3} - a^{3} d^{4}\right )} g^{4}}\right )} \log \left ({\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n} e\right ) - \frac {{\left (85 \, b^{3} c^{3} - 108 \, a b^{2} c^{2} d + 27 \, a^{2} b c d^{2} - 4 \, a^{3} d^{3} + 66 \, {\left (b^{3} c d^{2} - a b^{2} d^{3}\right )} x^{2} + 18 \, {\left (b^{3} d^{3} x^{3} + 3 \, b^{3} c d^{2} x^{2} + 3 \, b^{3} c^{2} d x + b^{3} c^{3}\right )} \log \left (b x + a\right )^{2} + 18 \, {\left (b^{3} d^{3} x^{3} + 3 \, b^{3} c d^{2} x^{2} + 3 \, b^{3} c^{2} d x + b^{3} c^{3}\right )} \log \left (d x + c\right )^{2} + 3 \, {\left (49 \, b^{3} c^{2} d - 54 \, a b^{2} c d^{2} + 5 \, a^{2} b d^{3}\right )} x + 66 \, {\left (b^{3} d^{3} x^{3} + 3 \, b^{3} c d^{2} x^{2} + 3 \, b^{3} c^{2} d x + b^{3} c^{3}\right )} \log \left (b x + a\right ) - 6 \, {\left (11 \, b^{3} d^{3} x^{3} + 33 \, b^{3} c d^{2} x^{2} + 33 \, b^{3} c^{2} d x + 11 \, b^{3} c^{3} + 6 \, {\left (b^{3} d^{3} x^{3} + 3 \, b^{3} c d^{2} x^{2} + 3 \, b^{3} c^{2} d x + b^{3} c^{3}\right )} \log \left (b x + a\right )\right )} \log \left (d x + c\right )\right )} n^{2}}{b^{3} c^{6} d g^{4} - 3 \, a b^{2} c^{5} d^{2} g^{4} + 3 \, a^{2} b c^{4} d^{3} g^{4} - a^{3} c^{3} d^{4} g^{4} + {\left (b^{3} c^{3} d^{4} g^{4} - 3 \, a b^{2} c^{2} d^{5} g^{4} + 3 \, a^{2} b c d^{6} g^{4} - a^{3} d^{7} g^{4}\right )} x^{3} + 3 \, {\left (b^{3} c^{4} d^{3} g^{4} - 3 \, a b^{2} c^{3} d^{4} g^{4} + 3 \, a^{2} b c^{2} d^{5} g^{4} - a^{3} c d^{6} g^{4}\right )} x^{2} + 3 \, {\left (b^{3} c^{5} d^{2} g^{4} - 3 \, a b^{2} c^{4} d^{3} g^{4} + 3 \, a^{2} b c^{3} d^{4} g^{4} - a^{3} c^{2} d^{5} g^{4}\right )} x}\right )} B^{2} - \frac {B^{2} \log \left ({\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n} e\right )^{2}}{3 \, {\left (d^{4} g^{4} x^{3} + 3 \, c d^{3} g^{4} x^{2} + 3 \, c^{2} d^{2} g^{4} x + c^{3} d g^{4}\right )}} - \frac {2 \, A B \log \left ({\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n} e\right )}{3 \, {\left (d^{4} g^{4} x^{3} + 3 \, c d^{3} g^{4} x^{2} + 3 \, c^{2} d^{2} g^{4} x + c^{3} d g^{4}\right )}} - \frac {A^{2}}{3 \, {\left (d^{4} g^{4} x^{3} + 3 \, c d^{3} g^{4} x^{2} + 3 \, c^{2} d^{2} g^{4} x + c^{3} d g^{4}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 948 vs.
\(2 (422) = 844\).
time = 0.35, size = 948, normalized size = 2.21 \begin {gather*} -\frac {18 \, {\left (A^{2} + 2 \, A B + B^{2}\right )} b^{3} c^{3} - 54 \, {\left (A^{2} + 2 \, A B + B^{2}\right )} a b^{2} c^{2} d + 54 \, {\left (A^{2} + 2 \, A B + B^{2}\right )} a^{2} b c d^{2} - 18 \, {\left (A^{2} + 2 \, A B + B^{2}\right )} a^{3} d^{3} + {\left (85 \, B^{2} b^{3} c^{3} - 108 \, B^{2} a b^{2} c^{2} d + 27 \, B^{2} a^{2} b c d^{2} - 4 \, B^{2} a^{3} d^{3}\right )} n^{2} + 6 \, {\left (11 \, {\left (B^{2} b^{3} c d^{2} - B^{2} a b^{2} d^{3}\right )} n^{2} - 6 \, {\left ({\left (A B + B^{2}\right )} b^{3} c d^{2} - {\left (A B + B^{2}\right )} a b^{2} d^{3}\right )} n\right )} x^{2} - 18 \, {\left (B^{2} b^{3} d^{3} n^{2} x^{3} + 3 \, B^{2} b^{3} c d^{2} n^{2} x^{2} + 3 \, B^{2} b^{3} c^{2} d n^{2} x + {\left (3 \, B^{2} a b^{2} c^{2} d - 3 \, B^{2} a^{2} b c d^{2} + B^{2} a^{3} d^{3}\right )} n^{2}\right )} \log \left (\frac {b x + a}{d x + c}\right )^{2} - 6 \, {\left (11 \, {\left (A B + B^{2}\right )} b^{3} c^{3} - 18 \, {\left (A B + B^{2}\right )} a b^{2} c^{2} d + 9 \, {\left (A B + B^{2}\right )} a^{2} b c d^{2} - 2 \, {\left (A B + B^{2}\right )} a^{3} d^{3}\right )} n + 3 \, {\left ({\left (49 \, B^{2} b^{3} c^{2} d - 54 \, B^{2} a b^{2} c d^{2} + 5 \, B^{2} a^{2} b d^{3}\right )} n^{2} - 6 \, {\left (5 \, {\left (A B + B^{2}\right )} b^{3} c^{2} d - 6 \, {\left (A B + B^{2}\right )} a b^{2} c d^{2} + {\left (A B + B^{2}\right )} a^{2} b d^{3}\right )} n\right )} x + 6 \, {\left ({\left (11 \, B^{2} b^{3} d^{3} n^{2} - 6 \, {\left (A B + B^{2}\right )} b^{3} d^{3} n\right )} x^{3} + {\left (18 \, B^{2} a b^{2} c^{2} d - 9 \, B^{2} a^{2} b c d^{2} + 2 \, B^{2} a^{3} d^{3}\right )} n^{2} - 3 \, {\left (6 \, {\left (A B + B^{2}\right )} b^{3} c d^{2} n - {\left (9 \, B^{2} b^{3} c d^{2} + 2 \, B^{2} a b^{2} d^{3}\right )} n^{2}\right )} x^{2} - 6 \, {\left (3 \, {\left (A B + B^{2}\right )} a b^{2} c^{2} d - 3 \, {\left (A B + B^{2}\right )} a^{2} b c d^{2} + {\left (A B + B^{2}\right )} a^{3} d^{3}\right )} n - 3 \, {\left (6 \, {\left (A B + B^{2}\right )} b^{3} c^{2} d n - {\left (6 \, B^{2} b^{3} c^{2} d + 6 \, B^{2} a b^{2} c d^{2} - B^{2} a^{2} b d^{3}\right )} n^{2}\right )} x\right )} \log \left (\frac {b x + a}{d x + c}\right )}{54 \, {\left ({\left (b^{3} c^{3} d^{4} - 3 \, a b^{2} c^{2} d^{5} + 3 \, a^{2} b c d^{6} - a^{3} d^{7}\right )} g^{4} x^{3} + 3 \, {\left (b^{3} c^{4} d^{3} - 3 \, a b^{2} c^{3} d^{4} + 3 \, a^{2} b c^{2} d^{5} - a^{3} c d^{6}\right )} g^{4} x^{2} + 3 \, {\left (b^{3} c^{5} d^{2} - 3 \, a b^{2} c^{4} d^{3} + 3 \, a^{2} b c^{3} d^{4} - a^{3} c^{2} d^{5}\right )} g^{4} x + {\left (b^{3} c^{6} d - 3 \, a b^{2} c^{5} d^{2} + 3 \, a^{2} b c^{4} d^{3} - a^{3} c^{3} d^{4}\right )} g^{4}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {A^{2}}{c^{4} + 4 c^{3} d x + 6 c^{2} d^{2} x^{2} + 4 c d^{3} x^{3} + d^{4} x^{4}}\, dx + \int \frac {B^{2} \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}^{2}}{c^{4} + 4 c^{3} d x + 6 c^{2} d^{2} x^{2} + 4 c d^{3} x^{3} + d^{4} x^{4}}\, dx + \int \frac {2 A B \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}}{c^{4} + 4 c^{3} d x + 6 c^{2} d^{2} x^{2} + 4 c d^{3} x^{3} + d^{4} x^{4}}\, dx}{g^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 3.46, size = 746, normalized size = 1.74 \begin {gather*} \frac {1}{54} \, {\left (18 \, {\left (\frac {3 \, {\left (b x + a\right )} B^{2} b^{2} n^{2}}{{\left (b^{2} c^{2} g^{4} - 2 \, a b c d g^{4} + a^{2} d^{2} g^{4}\right )} {\left (d x + c\right )}} - \frac {3 \, {\left (b x + a\right )}^{2} B^{2} b d n^{2}}{{\left (b^{2} c^{2} g^{4} - 2 \, a b c d g^{4} + a^{2} d^{2} g^{4}\right )} {\left (d x + c\right )}^{2}} + \frac {{\left (b x + a\right )}^{3} B^{2} d^{2} n^{2}}{{\left (b^{2} c^{2} g^{4} - 2 \, a b c d g^{4} + a^{2} d^{2} g^{4}\right )} {\left (d x + c\right )}^{3}}\right )} \log \left (\frac {b x + a}{d x + c}\right )^{2} - 6 \, {\left (\frac {2 \, {\left (B^{2} d^{2} n^{2} - 3 \, A B d^{2} n - 3 \, B^{2} d^{2} n\right )} {\left (b x + a\right )}^{3}}{{\left (b^{2} c^{2} g^{4} - 2 \, a b c d g^{4} + a^{2} d^{2} g^{4}\right )} {\left (d x + c\right )}^{3}} - \frac {9 \, {\left (B^{2} b d n^{2} - 2 \, A B b d n - 2 \, B^{2} b d n\right )} {\left (b x + a\right )}^{2}}{{\left (b^{2} c^{2} g^{4} - 2 \, a b c d g^{4} + a^{2} d^{2} g^{4}\right )} {\left (d x + c\right )}^{2}} + \frac {18 \, {\left (B^{2} b^{2} n^{2} - A B b^{2} n - B^{2} b^{2} n\right )} {\left (b x + a\right )}}{{\left (b^{2} c^{2} g^{4} - 2 \, a b c d g^{4} + a^{2} d^{2} g^{4}\right )} {\left (d x + c\right )}}\right )} \log \left (\frac {b x + a}{d x + c}\right ) + \frac {2 \, {\left (2 \, B^{2} d^{2} n^{2} - 6 \, A B d^{2} n - 6 \, B^{2} d^{2} n + 9 \, A^{2} d^{2} + 18 \, A B d^{2} + 9 \, B^{2} d^{2}\right )} {\left (b x + a\right )}^{3}}{{\left (b^{2} c^{2} g^{4} - 2 \, a b c d g^{4} + a^{2} d^{2} g^{4}\right )} {\left (d x + c\right )}^{3}} - \frac {27 \, {\left (B^{2} b d n^{2} - 2 \, A B b d n - 2 \, B^{2} b d n + 2 \, A^{2} b d + 4 \, A B b d + 2 \, B^{2} b d\right )} {\left (b x + a\right )}^{2}}{{\left (b^{2} c^{2} g^{4} - 2 \, a b c d g^{4} + a^{2} d^{2} g^{4}\right )} {\left (d x + c\right )}^{2}} + \frac {54 \, {\left (2 \, B^{2} b^{2} n^{2} - 2 \, A B b^{2} n - 2 \, B^{2} b^{2} n + A^{2} b^{2} + 2 \, A B b^{2} + B^{2} b^{2}\right )} {\left (b x + a\right )}}{{\left (b^{2} c^{2} g^{4} - 2 \, a b c d g^{4} + a^{2} d^{2} g^{4}\right )} {\left (d x + c\right )}}\right )} {\left (\frac {b c}{{\left (b c - a d\right )}^{2}} - \frac {a d}{{\left (b c - a d\right )}^{2}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 7.16, size = 1040, normalized size = 2.42 \begin {gather*} -{\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )}^2\,\left (\frac {B^2}{3\,d\,\left (c^3\,g^4+3\,c^2\,d\,g^4\,x+3\,c\,d^2\,g^4\,x^2+d^3\,g^4\,x^3\right )}+\frac {B^2\,b^3}{3\,d\,g^4\,\left (a^3\,d^3-3\,a^2\,b\,c\,d^2+3\,a\,b^2\,c^2\,d-b^3\,c^3\right )}\right )-\frac {\frac {18\,A^2\,a^2\,d^2-36\,A^2\,a\,b\,c\,d+18\,A^2\,b^2\,c^2-12\,A\,B\,a^2\,d^2\,n+42\,A\,B\,a\,b\,c\,d\,n-66\,A\,B\,b^2\,c^2\,n+4\,B^2\,a^2\,d^2\,n^2-23\,B^2\,a\,b\,c\,d\,n^2+85\,B^2\,b^2\,c^2\,n^2}{6\,\left (a\,d-b\,c\right )}-\frac {x\,\left (-49\,c\,B^2\,b^2\,d\,n^2+5\,a\,B^2\,b\,d^2\,n^2+30\,A\,c\,B\,b^2\,d\,n-6\,A\,a\,B\,b\,d^2\,n\right )}{2\,\left (a\,d-b\,c\right )}+\frac {b\,x^2\,\left (11\,B^2\,b\,d^2\,n^2-6\,A\,B\,b\,d^2\,n\right )}{a\,d-b\,c}}{x\,\left (27\,a\,c^2\,d^3\,g^4-27\,b\,c^3\,d^2\,g^4\right )-x^2\,\left (27\,b\,c^2\,d^3\,g^4-27\,a\,c\,d^4\,g^4\right )+x^3\,\left (9\,a\,d^5\,g^4-9\,b\,c\,d^4\,g^4\right )+9\,a\,c^3\,d^2\,g^4-9\,b\,c^4\,d\,g^4}-\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\,\left (\frac {2\,A\,B}{3\,c^3\,d\,g^4+9\,c^2\,d^2\,g^4\,x+9\,c\,d^3\,g^4\,x^2+3\,d^4\,g^4\,x^3}+\frac {2\,B^2\,b^3\,\left (x\,\left (d\,\left (\frac {d\,g^4\,n\,\left (a\,d-b\,c\right )\,\left (a\,d-3\,b\,c\right )}{2\,b^2}-\frac {c\,d\,g^4\,n\,\left (a\,d-b\,c\right )}{b}\right )-\frac {2\,c\,d^2\,g^4\,n\,\left (a\,d-b\,c\right )}{b}+\frac {d^2\,g^4\,n\,\left (a\,d-b\,c\right )\,\left (a\,d-3\,b\,c\right )}{b^2}\right )+c\,\left (\frac {d\,g^4\,n\,\left (a\,d-b\,c\right )\,\left (a\,d-3\,b\,c\right )}{2\,b^2}-\frac {c\,d\,g^4\,n\,\left (a\,d-b\,c\right )}{b}\right )-\frac {d\,g^4\,n\,\left (a\,d-b\,c\right )\,\left (a^2\,d^2-3\,a\,b\,c\,d+3\,b^2\,c^2\right )}{b^3}-\frac {3\,d^3\,g^4\,n\,x^2\,\left (a\,d-b\,c\right )}{b}\right )}{3\,d\,g^4\,\left (a^3\,d^3-3\,a^2\,b\,c\,d^2+3\,a\,b^2\,c^2\,d-b^3\,c^3\right )\,\left (3\,c^3\,d\,g^4+9\,c^2\,d^2\,g^4\,x+9\,c\,d^3\,g^4\,x^2+3\,d^4\,g^4\,x^3\right )}\right )-\frac {B\,b^3\,n\,\mathrm {atan}\left (\frac {B\,b^3\,n\,\left (6\,A-11\,B\,n\right )\,\left (\frac {a^3\,d^4\,g^4-a^2\,b\,c\,d^3\,g^4-a\,b^2\,c^2\,d^2\,g^4+b^3\,c^3\,d\,g^4}{a^2\,d^3\,g^4-2\,a\,b\,c\,d^2\,g^4+b^2\,c^2\,d\,g^4}+2\,b\,d\,x\right )\,\left (a^2\,d^3\,g^4-2\,a\,b\,c\,d^2\,g^4+b^2\,c^2\,d\,g^4\right )\,1{}\mathrm {i}}{d\,g^4\,\left (11\,B^2\,b^3\,n^2-6\,A\,B\,b^3\,n\right )\,{\left (a\,d-b\,c\right )}^3}\right )\,\left (6\,A-11\,B\,n\right )\,2{}\mathrm {i}}{9\,d\,g^4\,{\left (a\,d-b\,c\right )}^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________